﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace QuanLyBanGiay.ucControl
{
    public partial class ucHeader : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        //void dangnhap1()
        //{
        //    string chuoi = null;
        //    if (Session["Dangnhap"] == null)
        //    {
        //        panel1.Visible = true;
        //        panel2.Visible = false;
        //    }
        //    else
        //    {
        //        panel1.Visible = false;
        //        panel2.Visible = true;
        //        chuoi += "<br><br>Khách hàng :<br> " + Session["Dangnhap1"] + "";
        //    }
        //    ltrLogin.Text = chuoi;
        //}
        //  protected void btnLogin_Click(object sender, EventArgs e)
        //{
        //    string user = txtId.Text;
        //    System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
        //    byte[] hashedDataBytes = md5.ComputeHash(System.Text.UTF8Encoding.UTF8.GetBytes(txtPassword.Text.Trim()));
        //    string pas = Convert.ToBase64String(hashedDataBytes);
        //    string chuoi = null;
        //    List<Data.tbCUSTOMERS> list = new List<Data.tbCUSTOMERS>();
        //    list = Business.tbCUSTOMERSService.tbCUSTOMERS_GetByTop("1", "vusername='" + user + "' and vpassword='" + pas + "'", "iusid");
        //    if (list.Count > 0)
        //    {
        //        //FromsAuthentication.SetAuthCookie(user, false);
        //        FormsAuthentication.SetAuthCookie(user, false);
        //        Session["Dangnhap"] = list[0].iusid.Trim();
        //        Session["Dangnhap1"] = list[0].vcusname.Trim();
        //        chuoi += "";
        //       // Response.Redirect(Request.Url.LocalPath.ToString());
        //        Response.Redirect("/index.aspx");

        //    }
        //    else
        //    {
        //        Common.WebMsgBox.Show("Sai thông tin đăng nhập");
        //    }
        //}

        //protected void btnThoat_Click(object sender, EventArgs e)
        //{
        //    Session["Dangnhap"] = null;
        //    Response.Redirect("/index.aspx");
        //}

        //protected void Pas_Click(object sender, EventArgs e)
        //{
        //    Response.Redirect("/Doi-mat-khau.htm");
        //}
  //  }
    }
}